Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for tree-shaking #112

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

LitoMore
Copy link
Collaborator

@LitoMore LitoMore commented Feb 5, 2025

Changes

  • Add support for tree-shaking

Need a discussion

My current implementation is to export two types of functions like this below, one is for the raw and another is for the rounded:

export const rgbToHslRaw = rgb => {
	const r = rgb[0] / 255;
	const g = rgb[1] / 255;
	const b = rgb[2] / 255;
	return [h, s * 100, l * 100];
};

export const rgbToHsl = wrapRounded(rgbToHslRaw);

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants